Updated for 2.6.1 by: The Tech Support Team, Pictorius Incorporated
Contents: Table.pgs
Table Read Me
Needs Prograph Extensions:
The default configuration of your 'Prograph Extensions' folder.
Needs Libraries to Compile:
SCLibrary 2.6
Library 2.6
Description
-----------
This is an example of a scrolling table with multiple columns. You can set the width and justification of each column independently. The file Table.pgs contains the Table class, and a Demo Window which demonstrates how to use it.
Select Run from the Exec menu and the Table Demo window will appear.
You may change various attributes of the Table using the Pop-up Menus,
Radio Buttons, and Check Boxes in the window. The code for these items
resides in the Table Demo class. You can access it while running by
holding down command-shift-option while you click on an item.
How to Use The Table Class in Your Program
-----------------------------------------
The Table class is intended to be used in the same way as the Scroll List
class. It contains attributes analogous to those of the Scroll List class to
determine its appearance and functionality. Most of these attributes are
functionally identical in both classes. Two of them, however, are
different:
The value list attribute in a Scroll List contains a list of strings. In a
Table it contains a list of sub-lists. Each such sub-list represents one row
in the Table, and is itself a list of strings.
The columns attribute does not exist in the Scroll List class. In the Table,
it serves to define the columns of the Table. The columns attribute
consists of a list of sub-lists. Each sub-list corresponds to one column in
the Table, and contains a pair of integer values. These values are the
width of the column ( in pixels ), and the justification of the column (left=0, center=1, or right=-1 ).
The number of columns defined for a Table is defined by the number of
sub-lists in the columns attribute. Note that a row in the value list may
contain any number of entries. If this number exceeds the number of
columns, the extra entries are ignored. If there are fewer entries than
columns, the remainder of the row is left blank.
The Table class also contains a number of overshadowed set methods
for various attributes. They ensure that the Table is properly updated
when an attribute is set. Be sure to use these set methods in your